package com.chenjun.core.service.oa.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chenjun.common.model.DataGridModel;
import com.chenjun.core.dao.generator.entity.OaDictYearCfg;
import com.chenjun.core.dao.generator.mapper.OaDictYearCfgMapper;
import com.chenjun.core.service.oa.OaDictNotStdManHoursCfgService;
import com.chenjun.core.service.oa.OaDictYearCfgService;

@Service
@Transactional
public class OaDictYearCfgServiceImpl implements OaDictYearCfgService {

	@Autowired
	private OaDictYearCfgMapper oaDictYearCfgMapper;
	
	@Override
	public OaDictYearCfg get(int id) {
		return oaDictYearCfgMapper.selectByPrimaryKey(id);
	}

	@Override
	public int create(OaDictYearCfg oaDictYearCfg) {
		return oaDictYearCfgMapper.insert(oaDictYearCfg);
	}

	@Override
	public int delete(String id) {
		return oaDictYearCfgMapper.deleteByPrimaryKey(Integer.valueOf(id));
	}

	@Override
	public int update(OaDictYearCfg oaDictYearCfg) {
		return oaDictYearCfgMapper.updateByPrimaryKey(oaDictYearCfg);
	}

	@Override
	public List<OaDictYearCfg> doListByCondition(DataGridModel param) {
		return oaDictYearCfgMapper.selectByCondition(param);
	}

	@Override
	public List<OaDictYearCfg> selectAll() {
		return oaDictYearCfgMapper.selectAll();
	}


}
